    <?php
        foreach ($posts as $v) {
    ?>
    <div class="post">
        <header class="entryHead">
            <h3 class="entryTitle">
                <a href="<?=$this->createUrl(null, null, array('id' => $v['id']), 'post') ?>"><?=$v['title']?></a>
            </h3>
        </header>
        <div class="entryContent">
            <div><?=$v['text']?></div>
        </div>
        <div class="entryMeta">
            
            <div class="date"><i class="icon-time"></i>&nbsp;<?=$v['date']?></div>
            <div class="fright"><i class="icon-eye-open"></i>&nbsp;<?=$v['views']?></div>
            <div class="fright"><?php $this->widget('CommentsCount', array(), array('postId' => $v['id']));?></div>
            <div class=""><i class="icon-tags"></i>&nbsp;
                <?php $this->widget('PostTags', array(), array('postId' => $v['id']));?>
            </div>
        </div>
    </div>
    <?php     
        }
        if (isset($paginator)) {
            $this->widget('Pagination', array('route' => 'posts'), array('paginator' => $paginator));
        }
    ?>
